module Convert where 

import List 
import Lexer
import Parser
import CNF
import System(getArgs) 

main :: IO ()
main = do
   args <- getArgs
   if length args /= 1
      then putStrLn "Usage: runghc Convert \"+(*(1 2) *(3 4 5))"
      else putStrLn ("Result = " ++ process (args !! 0))

process :: String -> String
process s = concat [ (show.conv) f | f <- parse s ]